<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/7/23
  Time: 16:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    System.out.println("basepath:"+basepath);
%>
<!DOCTYPE html>
<html>

<head>

    <base href="<%=basepath %>" />
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="layui/css/layui.css"  media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>

<table class="layui-hide" id="test"></table>


<script src="layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

<script>
    layui.use('table', function(){
        var table = layui.table;

        table.render({
            elem: '#test'
            ,url:'http://localhost:8080/credit-user-message/selectAll'
            ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增

            ,cols: [[
                {type:'checkbox'},
                {field:'cumId', width:80, title: 'ID', sort: true}
                ,{field:'cumName', width:80, title: '用户名'}
                ,{field:'cardType', width:80, title: '信用卡类型', sort: true}
                ,{field:'idCard', width:80, title: '身份证号'}
                ,{field:'phone', title: '手机号', width: '30%', minWidth: 100} //minWidth：局部定义当前单元格的最小宽度，layui 2.2.1 新增
                ,{field:'email', title: '邮箱', sort: true}
            ]],
            page:true
        });
    });
</script>

</body>
</html>
